This invention relates to digital memory controllers generally and, more particularly, to a memory controller with interacting state machines.
Dynamic Random Access Memory (DRAM) is the most common type of electronic memory deployed in computer systems. DRAMS are often organized into a plurality of memory banks. See, for example, the data sheet for the MT48LC2M32B2 product available from Micron Technology, Inc. of Boise Id., which is herein incorporated by reference.
Many DRAMS have multiple banks that share row addresses. While one memory bank is in the second half of its read cycle for a particular column, another memory bank may simultaneously be in the first half of its read cycle for any address within that same row. If the memories across a row are sequentially accessed, which occurs in burst mode, then the multiple memory bank scheme saves time because RAS precharge delays and strobing delays are overlapped for the memory access to a bank that is accessed after another bank, as in the above example.
Memory controllers must manage access to the multiple banks. Conventional approaches allocate one state machine to each bank within the memory, where the state machine dictates the next action to be taken based upon the current state of the memory bank and input provided to the state machine, such as the result of a previous action. For example, if the current state of the state machine is that a row is active and the input row address to the state machine is that the row is the proper one, then the state machine may dictate that a CAS (column strobe) signal be applied without row strobe (RAS).
Allocating one state machine to each memory bank may result in a relatively high complexity and gate count. Further, such approaches do not scale to memories with numerous banks. It would be desirable to have a memory controller that requires relatively fewer gates, could scale to larger bank counts, and provides overlapping of the multiple memory transactions.
A memory controller for controlling a multiple bank DRAM comprises a pool/queue state machine, a plurality of transaction processor state machines, a command arbitor and a plurality of bank state machines, preferably with one bank state machine for each bank in the DRAM.
As transactions are received by the controller, they are allocated by the pool/queue state machine to one of the transaction processor state machines. Assuming one of the transaction processor state machines has accepted the transaction, that transaction processor state machine stores the address information and burst length (assuming the memory supports bursty read/writes) of the read/write request. The receiving transaction processor state machine first checks if the memory bank corresponding to the read/write address is available. What is meant by available will be further described below. This check is performed by polling the pertinent bank state machine; each of the transaction processor state machines is coupled to each of the bank state machines, which indicate whether their corresponding banks are available.
Once the bank is available, the transaction processor state machine then sends a RAS (row access strobe) request to the arbitor. The arbitor receives this request and arbitrates between it and other pending requests (both CAS and RAS requests from the other transaction processor state machines and precharge requests from the bank state machines).
Each of the transaction processor state machines is coupled to the arbitor output. When a transaction processor state machine detects that its RAS request has appeared on the arbitor output, it then provides a CAS request to the arbitor. Each of the bank state machines is coupled to the arbitor output. When the bank state machine corresponding to the bank activated by a particular RAS command detects that RAS command on the arbitor output, it becomes active, and eventually issues a precharge command to the arbitor.